package com.demo.design.stractural.flyweight.demo2;

public class RealTicket implements Ticket {
    private String from;

    private String to;

    private Integer price;

    public RealTicket() {}

    public RealTicket(String from, String to) {
        this.from = from;
        this.to = to;
    }
    @Override
    public void showPrice(String bank) {
        this.price =(int) (1000 * Math.random());
        System.err.println(from + "===>" + to + "的" + bank + "票:" + price + "元");
    }
}
